home *** CD-ROM | disk | FTP | other *** search
/ Business & Presentations / Business and Presentations - Volume 1 (1995)(Sideface)(NL).iso / virus / tbav603 / tbgensig.doc < prev    next >
Text File  |  1993-06-14  |  21KB  |  661 lines

  1.  
  2.  
  3.  Thunderbyte signature compiler. (C) Copyright 1993 Thunderbyte B.V.
  4.  
  5.  
  6.                                Table of Contents
  7.  
  8.  
  9.     1. INTRODUCTION...................................... 2
  10.         1.1. Purpose of TbGenSig......................... 2
  11.         1.2. General information......................... 2
  12.  
  13.     2. DEFINING SIGNATURES............................... 2
  14.         2.1. Format of the UserSig.Dat file.............. 2
  15.         2.2. Adding a published signature................ 3
  16.         2.3. Defining a signature with TbScan............ 3
  17.  
  18.     3. ADVANCED FEATURES................................. 5
  19.         3.1. Keywords.................................... 5
  20.             3.1.1. Item keywords......................... 5
  21.             3.1.2. Message keywords...................... 6
  22.             3.1.3. Position keywords..................... 6
  23.         3.2. Wildcards................................... 8
  24.             3.2.1. Position wildcards.................... 8
  25.                 3.2.1.1. Skip............................ 8
  26.                 3.2.1.2. Variable........................ 8
  27.             3.2.2. Opcode wildcards...................... 8
  28.                 3.2.2.1. Low opcode...................... 8
  29.                 3.2.2.2. High opcode..................... 8
  30.         3.3. Example..................................... 9
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                      Page i
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.                                      Page 1
  122.  
  123.  Thunderbyte signature compiler. (C) Copyright 1993 Thunderbyte B.V.
  124.  
  125.  
  126. 1.  INTRODUCTION
  127.  
  128.  
  129.   1.1.  Purpose of TbGenSig
  130.  
  131.     TbGenSig is a signature file compiler. Since TBAV is distributed
  132.     with an up to date, ready-to-use signature file, you don't really
  133.     need the signature file compiler.
  134.  
  135.     However, you need the signature file compiler if you want to define
  136.     your own virus signatures. You can used either published signatures
  137.     or define your own ones if you are familiar with the structure of
  138.     software.
  139.  
  140.     In both cases, you only need to do this in emergency situations,
  141.     like the unfortunate event that your machine or even company is
  142.     attacked by an yet unknown and thus not recognized virus. It is
  143.     recommended to send a few samples of the virus to some virus
  144.     experts anyway, in order to make scanners to recognize the virus in
  145.     the next versions of the scanners.
  146.  
  147.     It isn't possible to explain the whole subject of virus hunting in
  148.     one manual, so this document assumes that you have enough
  149.     expenrience and knowledge to make your own signatures.
  150.  
  151.  
  152.   1.2.  General information
  153.  
  154.     TbGenSig searches for a file name UserSig.Dat in the current
  155.     directory. This file should contain the signatures you want to add
  156.     to the TBAV signature file TbScan.Sig. TbGenSig checks the contents
  157.     of the UserSig.Dat file and applies it to the TbScan.Sig file.
  158.  
  159.     If you want to delete or modify your signatures, just edit or
  160.     delete the UserSig.Dat file and run TbGenSig again.
  161.  
  162.     TbGenSig will list all signatures in the TbScan.Sig file on the
  163.     screen when running.
  164.  
  165.  
  166. 2.  DEFINING SIGNATURES
  167.  
  168.  
  169.   2.1.  Format of the UserSig.Dat file
  170.  
  171.     You can create and edit the UserSig.Dat file with every DOS text
  172.     editor able to output unformatted text.
  173.  
  174.     All lines starting with ';' are comment lines. TbGenSig ignores
  175.     these lines.
  176.  
  177.     Lines starting with '%' will be displayed in the upper TbGenSig
  178.  
  179.  
  180.  
  181.                                      Page 2
  182.  
  183.  Thunderbyte signature compiler. (C) Copyright 1993 Thunderbyte B.V.
  184.  
  185.  
  186.     window.
  187.  
  188.     In the first line the name of a virus is expected. The second line
  189.     contains one or more keywords. The third line contains the
  190.     signature itself. This combination of three lines is named a
  191.     signature record.
  192.  
  193.     An signature record should look like this:
  194.  
  195.         Test virus
  196.         exe com inf
  197.         abcd21436587abcd
  198.  
  199.     It is allowed to use spaces in the signature for your own
  200.     convenience. TbGenSig will ignore those spaces.
  201.  
  202.  
  203.   2.2.  Adding a published signature
  204.  
  205.     If you want to add a signature that has been published, do the
  206.     following.
  207.  
  208.     -   Edit or create the UserSig.Dat file. Convert the published
  209.         signature to an acceptable format for TbGenSig.
  210.  
  211.     -   Use keywords COM EXE BOOT INF
  212.  
  213.         You would get:
  214.  
  215.                 New virus
  216.                 exe com boot inf
  217.                 1234abcd5678efab
  218.  
  219.     -   Execute TbGenSig.
  220.  
  221.  
  222.   2.3.  Defining a signature with TbScan
  223.  
  224.     This chapter is intended for advanced users who own a TBAV.KEY
  225.     file or a Thunderbyte add-on card.
  226.  
  227.     Although the TbScan.Sig file is updated frequently, new viruses are
  228.     created each day, outpacing the regular upgrading service of this
  229.     data file. It is therefore possible that one day your system gets
  230.     infected by a recently created virus that has not yet been listed
  231.     in the signature file.  TbScan will not always detect the virus
  232.     in such cases, not even with the heuristic analysis.  If you are
  233.     convinced that your system must have been infected without TbScan
  234.     confirming this, this chapter will supply you with a valuable tool
  235.     to detect undocumented viruses with. We offer you step-by-step
  236.     assistance here in creating an emergency signature that can be
  237.     (temporarily) added to your copy of TbScan.Sig
  238.  
  239.  
  240.  
  241.                                      Page 3
  242.  
  243.  Thunderbyte signature compiler. (C) Copyright 1993 Thunderbyte B.V.
  244.  
  245.  
  246.     -   Collect some infected files and copy them into a temporary
  247.         directory.
  248.  
  249.     -   Boot from a clean write-protected diskette. Do NOT execute ANY
  250.         program from the infected system, even though you expect this
  251.         program to be clean.
  252.  
  253.     -   Execute TbScan from your write-protected TbScan diskette with
  254.         the 'extract' option set. Make sure that the temporary directory
  255.         where you put the infected files will be TbScan's target
  256.         directory. With its 'extract' option set, TbScan will NOT scan
  257.         the files but, instead, display the first instructions that are
  258.         found at the entry-point of the infected programs.  Please note
  259.         that we highly recommend you to simultaneously set the
  260.         'session' option of TbScan to generate a log file.
  261.  
  262.     -   Compare the 'signatures' extracted by TbScan. You should see
  263.         something like this:
  264.  
  265.                 NOVIRUS1.COM    2E67BCDEAB129090909090ABCD123490CD
  266.                 NOVIRUS2.COM    N/A
  267.                 VIRUS1.COM      1234ABCD5678EFAB909090ABCD123478FF
  268.                 VIRUS2.COM      1234ABCD5678EFAB901234ABCD123478FF
  269.                 VIRUS3.COM      1234ABCD5678EFAB9A5678ABCD123478FF
  270.  
  271.         If the 'signatures' are completely different, the files are
  272.         probably not infected, else they have been infected by a
  273.         polymorphic virus that requires an AVR module to detect it.
  274.  
  275.     -   There might be some differences in the 'signatures'. You can
  276.         use the question mark wildcard ('?') in this case.
  277.  
  278.         A signature to detect the 'virus' in the example above could be:
  279.  
  280.                 1234ABCD5678EFAB ?3 ABCD123478FF
  281.  
  282.         The '?3' means that there are three bytes on that position that
  283.         should be skipped.
  284.  
  285.     -   Add the signature to the data file UserSig.Dat file. Give the
  286.         virus a name in the first line of its entry. Specify the
  287.         following keywords: COM, EXE, INF, ATE keywords in the second
  288.         line.  Enter the signature on the third.
  289.  
  290.         You would get:
  291.  
  292.                 New virus
  293.                 exe com ate inf
  294.                 1234abcd5678efab?3abcd123478ff
  295.  
  296.     -   Execute TbGenSig. Make sure the resulting TbScan.Sig file is in
  297.         the TbScan directory.
  298.  
  299.  
  300.  
  301.                                      Page 4
  302.  
  303.  Thunderbyte signature compiler. (C) Copyright 1993 Thunderbyte B.V.
  304.  
  305.  
  306.     -   Run TbScan a